package com.terrynoya.qtree
{
	import com.terrynoya.collision.ICollision;
	
	import flash.display.DisplayObject;
	import flash.geom.Point;

	/**
	 * 
	 * @author TerryYao
	 */
	public class QTreeNoteItem
	{
		private var _dislayObject:DisplayObject;
		
		private var _canPushDown:Boolean = true;
		
		/**
		 * 
		 * @param dislayObject
		 */
		public function QTreeNoteItem(dislayObject:DisplayObject)
		{
			this._dislayObject = dislayObject;
		}

		/**
		 * 
		 * @return 
		 */
		public function get canPushDown():Boolean
		{
			return _canPushDown;
		}

		/**
		 * 
		 * @param value
		 */
		public function set canPushDown(value:Boolean):void
		{
			_canPushDown = value;
		}

		/**
		 * 
		 * @param value
		 */
		public function set colision(value:Boolean):void
		{
			ICollision(this._dislayObject).collision = value;
		}
		
		/**
		 * 
		 * @return 
		 */
		public function get q():Point
		{
			return new Point(this._dislayObject.x,this._dislayObject.y);
		}
		
		/**
		 * 
		 * @return 
		 */
		public function get w():Point
		{
			return new Point(this._dislayObject.x + this._dislayObject.width,this._dislayObject.y);
		}
		
		/**
		 * 
		 * @return 
		 */
		public function get s():Point
		{
			return new Point(this._dislayObject.x + this._dislayObject.width,this._dislayObject.y + this._dislayObject.height);
		}
		
		/**
		 * 
		 * @return 
		 */
		public function get a():Point
		{
			return new Point(this._dislayObject.x,this._dislayObject.y + this._dislayObject.height);
		}
		
		/**
		 * 
		 * @return 
		 */
		public function toString():String
		{
			return this.q.toString();
		}
	}
}